package com.itheima.user.feign;

import com.itheima.user.pojo.ItemsCollect;
import com.itheima.user.pojo.ItemsHistory;
import com.itheima.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name="user")
public interface ItemsCollectFeign {

    @PostMapping(value = "/itemsCollect/search" )
    Result<List<ItemsCollect>> findList(@RequestBody(required = false) ItemsCollect itemsCollect);

    @PostMapping("/itemsCollect")
    Result add(@RequestBody ItemsCollect itemsCollect);

    @DeleteMapping(value = "/itemsCollect/{id}" )
    Result delete(@PathVariable("id") String id);
}
